package com.imooc.utils;

import com.imooc.domain.Result;

/**
 * Created by ancy on 2017/7/8.
 */
public class ResultUtil {

    public  static Result success ( Object object) {
        Result result = new Result();

        result.setCode(200);
        result.setMsg("成功");
        result.setData(object);
        return result;
    }

    public  static Result success () {
        Result result = new Result();
        result.setCode(200);
        result.setMsg("成功");
        return result;
    }

    public static  Result error (Integer code, String msg) {
        Result result = new Result();

        result.setCode(code);
        result.setMsg(msg);
//        result.setData(object);
        return result;
    }

}
